#include "CBootStrapDescriptor.h"


CBootStrapDescriptor::CBootStrapDescriptor(void):IDescriptorData(DESCRIPTOR_TAG_BOOTSTRAP)
, m_ucDisplayA(1)
, m_ucDisplayB(1)
, m_ucDelayMain(0)
, m_ucReserved(0)
{	
}

CBootStrapDescriptor::~CBootStrapDescriptor(void)
{
}

void CBootStrapDescriptor::GetData(BYTE* buff  , int &len)
{	
	CBuffer stBuffer(buff,DESCRIPTOR_MAXLEN);
	PACK_DESCRIPTOR_BUFFER_START(stBuffer,DESCRIPTOR_TAG_BOOTSTRAP);

	stBuffer.Write((BYTE)(((m_ucDisplayA << 7)
		| (m_ucDisplayB << 6)
		| (m_ucDelayMain << 5))
		| 0x1F));

	len = PACK_DESCRIPTOR_BUFFER_END(stBuffer);

}